226        Bioinformatics

(int(-10*log10qvalue), and peak (o-based offset from start). Either p-value or q-value is

present in “*_peaks.narrowPeak” file depending on which threshold option is used: “-p”

or “-q”.

6.3.5  Visualizing ChIP-Seq Enrichment in Genome Browser

In this step, we will visualize the enrichment signals contained in the bedGraph files

­(*control_lambda.bdg, and *treat_pileup.bdg) and peak densities in the BED file (*peaks.

narrowPeak) in a genome browser like a UCSC Genome Browser or IGB. There are three

files for each ChIP-Seq sample. First, we need to convert bedGraph format into BigWig for-

mat, which is an indexed binary file created from bedGraph file using “bedGraph­ToBigWig”

utility for fast display. We can download the conversion utilities from the UCSC using the

following commands (download these programs in the directory where the MACS3 output

files are found for easy use):

rsync -aP \

rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/

bedGraphToBigWig ./

rsync -aP \

rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/

bigWigToWig ./

rsync -aP \

rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/

fetchChromSizes ./

The “bedGraphToBigWig” utility converts a file from the bedGraph format to the BigWig

format. The “bigWigToWig” utility converts a file from the BigWig format to the Wig for-

mat. The “fetchChromSizes” utility creates a text file (from a reference genome) containing

the chromosome names and sizes in bases. For more information about these commands

and file format, refer to the UCSC website.

Before proceeding, we need to create a text file containing the name of the human chro-

mosomes and their sizes using “fetchChromSizes”.

fetchChromSizes hg19 > hg19.chrom.sizes

The file “hg19.chrom.sizes” will be created in the working directory; you can view it using

“less hg19.chrom.sizes”. This file consists of two columns: chromosome name and chromo-

some size in bases.

Now, we can convert the bedGraph files to BigWig format and then from BigWig format

to Wig format using the following commands while the working directory is the one where

the MACS3 output files are found:

mkdir vis

#Convert *control_lambda.bdg from bedGraph to BigWig

bedGraphToBigWig \